{
    // 枚举:如果不设置值，默认从0开始
    // type Direction ='上'|'下'|'左'|'右'
    // 数字
    /* enum Direction{
        UP=100,
        DOWN,
        LEFT=200,
        RIGHT
    } */
    // 字符串
    var Direction = void 0;
    (function (Direction) {
        Direction["UP"] = "\u4E0A";
        Direction["DOWN"] = "\u4E0B";
        Direction[Direction["LEFT"] = 200] = "LEFT";
        Direction[Direction["RIGHT"] = 201] = "RIGHT";
    })(Direction || (Direction = {}));
    function changeDirection(direction) {
        console.log(direction);
    }
    // changeDirection('上')
    changeDirection(Direction.UP);
    changeDirection(Direction.DOWN);
    changeDirection(Direction.LEFT);
    changeDirection(Direction.RIGHT);
    // 如果后端给的是100 上 101 下 102 左 103 右
}
